package lumis.portal.presentation.core;

import lumis.portal.presentation.perspective.IPortalMode;

import org.apache.wicket.MarkupContainer;
import org.apache.wicket.markup.ContainerInfo;
import org.apache.wicket.markup.MarkupCache;
import org.apache.wicket.util.resource.IFixedLocationResourceStream;
import org.apache.wicket.util.resource.IResourceStream;

/**
 * Markup resource stream that allows a {@link IFixedLocationResourceStream}
 * to be shared. This implementation prevents {@link MarkupCache} from
 * using the same markup for the resource stream even if the cacheKey differs. 
 *
 * @version $Revision: 13093 $ $Date: 2011-05-28 18:40:18 -0300 (Sat, 28 May 2011) $
 * @since 6.0.0
 */
@SuppressWarnings("serial")
public class SharedMarkupResourceStream extends LayoutFileMarkupResourceStream
{
	public SharedMarkupResourceStream(IResourceStream resourceStream, MarkupContainer container, IPortalMode portalMode)
	{
		super(resourceStream, new ContainerInfo(container), container.getClass(), portalMode);
	}

	@Override
	public String locationAsString()
	{
		return null;
	}
}
